﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ViewOrderHistory.aspx.cs" Inherits="AKMII.DMRA.Web.ViewOrderHistory"  %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Agent Lead Order & Delivery System</title>
 
    <style type="text/css">

.BorderLeft22
{
	PADDING-RIGHT: 0px;
	PADDING-LEFT: 0px;
	FONT-SIZE: 11px;
	FONT-WEIGHT: bold;
	COLOR: #076eb1;
	PADDING-BOTTOM: 0px;
	PADDING-TOP: 0px;
	BACKGROUND: #e9f9ff;
	border-top: #dbdce3 1px solid;
	border-bottom: #dbdce3 1px solid;
	 border-right: #dbdce3 1px solid;
	 border-left: #dbdce3 1px solid;
	WHITE-SPACE: normal;
	TEXT-ALIGN: center;
	height: 25px;
	position:relative;
	left:expression(this.offsetParent.scrollLeft);
	top:expression(this.offsetParent.scrollTop-1);
	z-index:15;
}

.subheader
{
	PADDING-RIGHT: 0px;
	PADDING-LEFT: 0px;
	font-family:Tahoma;
	font-size:.8em;
	color:#000000;
	height:25px;
	border-top: #dbdce3 1px solid;
	border-bottom: #dbdce3 1px solid;
	 border-right: #dbdce3 1px solid;
	 border-left: #dbdce3 1px solid;
	TEXT-ALIGN: center;
	PADDING-BOTTOM: 0px;
	PADDING-TOP: 0px;
	white-space: normal;
}
a:link, a:visited{color:#0033CC;}
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div id="0">
    
        <asp:GridView ID="DataList1" runat="server" 
            onpageindexchanging="GridView1_PageIndexChanging" AutoGenerateColumns="False"
            Width="630px" AllowPaging="True" style="text-align: center" 
             PageSize="100" ForeColor="Black">
            <EmptyDataTemplate>
                There is no zip code you had ordered at lastest 12 months!
            </EmptyDataTemplate>
            <HeaderStyle CssClass="ItemListHeaderRow" BackColor="#e9f9ff" Font-Bold="False" 
                Font-Names="Arial" Font-Size="12px" ForeColor="#076EB1"  />
                        <Columns>
                <asp:BoundField HeaderText="Lead Block" DataField="LeadBlockCode" ItemStyle-CssClass="subheader"> 
                
                    <ItemStyle Width="40px" />
                </asp:BoundField>
                <asp:BoundField HeaderText="Zip Code" DataField="ZipName" ItemStyle-CssClass="subheader"/>
                            <asp:BoundField DataField="County" HeaderText="County" ItemStyle-CssClass="subheader"/>
                            <asp:BoundField DataField="City" HeaderText="City" ItemStyle-CssClass="subheader"  />
                            <asp:BoundField DataField="State" HeaderText="State" ItemStyle-CssClass="subheader"/>
                            <asp:BoundField DataField="Territory" HeaderText="Territory" ItemStyle-CssClass="subheader"/>
                      <asp:TemplateField  ItemStyle-CssClass="subheader">
                   <HeaderTemplate>
                   <%=GetLatestMonthByCurrentMonth(-11)%> <br />ALN
                   </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" Text='<%# ShowFork(bool.Parse(Eval("IsOrderInTwelveALN").ToString())) %>' runat="server"></asp:Label>
                    </ItemTemplate>
<ItemStyle CssClass="subheader"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField  ItemStyle-CssClass="subheader">
                   <HeaderTemplate>
                   <%=GetLatestMonthByCurrentMonth(-11)%> <br />Bus
                   </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" Text='<%# ShowFork(bool.Parse(Eval("IsOrderInTwelveBus").ToString())) %>' runat="server"></asp:Label>
                    </ItemTemplate>
<ItemStyle CssClass="subheader"></ItemStyle>
                </asp:TemplateField>
                      <asp:TemplateField  ItemStyle-CssClass="subheader">
                   <HeaderTemplate>
                   <%=GetLatestMonthByCurrentMonth(-10)%> <br />ALN
                   </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" Text='<%# ShowFork(bool.Parse(Eval("IsOrderInElevenALN").ToString())) %>' runat="server"></asp:Label>
                    </ItemTemplate>
<ItemStyle CssClass="subheader"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField  ItemStyle-CssClass="subheader">
                   <HeaderTemplate>
                   <%=GetLatestMonthByCurrentMonth(-10)%> <br />Bus
                   </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" Text='<%# ShowFork(bool.Parse(Eval("IsOrderInElevenBus").ToString())) %>' runat="server"></asp:Label>
                    </ItemTemplate>
<ItemStyle CssClass="subheader"></ItemStyle>
                </asp:TemplateField>
                      <asp:TemplateField  ItemStyle-CssClass="subheader">
                   <HeaderTemplate>
                   <%=GetLatestMonthByCurrentMonth(-9)%> <br />ALN
                   </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" Text='<%# ShowFork(bool.Parse(Eval("IsOrderInTenALN").ToString())) %>' runat="server"></asp:Label>
                    </ItemTemplate>
<ItemStyle CssClass="subheader"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField  ItemStyle-CssClass="subheader">
                   <HeaderTemplate>
                   <%=GetLatestMonthByCurrentMonth(-9)%> <br />Bus
                   </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" Text='<%# ShowFork(bool.Parse(Eval("IsOrderInTenBus").ToString())) %>' runat="server"></asp:Label>
                    </ItemTemplate>
<ItemStyle CssClass="subheader"></ItemStyle>
                </asp:TemplateField>
                      <asp:TemplateField  ItemStyle-CssClass="subheader">
                   <HeaderTemplate>
                   <%=GetLatestMonthByCurrentMonth(-8)%> <br />ALN
                   </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" Text='<%# ShowFork(bool.Parse(Eval("IsOrderInNineALN").ToString())) %>' runat="server"></asp:Label>
                    </ItemTemplate>
<ItemStyle CssClass="subheader"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField  ItemStyle-CssClass="subheader">
                   <HeaderTemplate>
                   <%=GetLatestMonthByCurrentMonth(-8)%> <br />Bus
                   </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" Text='<%# ShowFork(bool.Parse(Eval("IsOrderInNineBus").ToString())) %>' runat="server"></asp:Label>
                    </ItemTemplate>
<ItemStyle CssClass="subheader"></ItemStyle>
                </asp:TemplateField>
                      <asp:TemplateField  ItemStyle-CssClass="subheader">
                   <HeaderTemplate>
                   <%=GetLatestMonthByCurrentMonth(-7)%> <br />ALN
                   </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" Text='<%# ShowFork(bool.Parse(Eval("IsOrderInEightALN").ToString())) %>' runat="server"></asp:Label>
                    </ItemTemplate>
<ItemStyle CssClass="subheader"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField  ItemStyle-CssClass="subheader">
                   <HeaderTemplate>
                   <%=GetLatestMonthByCurrentMonth(-7)%> <br />Bus
                   </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" Text='<%# ShowFork(bool.Parse(Eval("IsOrderInEightBus").ToString())) %>' runat="server"></asp:Label>
                    </ItemTemplate>
<ItemStyle CssClass="subheader"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField  ItemStyle-CssClass="subheader">
                   <HeaderTemplate>
                   <%=GetLatestMonthByCurrentMonth(-6)%> <br />ALN
                   </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" Text='<%# ShowFork(bool.Parse(Eval("IsOrderInSevenALN").ToString())) %>' runat="server"></asp:Label>
                    </ItemTemplate>
<ItemStyle CssClass="subheader"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField  ItemStyle-CssClass="subheader">
                   <HeaderTemplate>
                   <%=GetLatestMonthByCurrentMonth(-6)%> <br />Bus
                   </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" Text='<%# ShowFork(bool.Parse(Eval("IsOrderInSevenBus").ToString())) %>' runat="server"></asp:Label>
                    </ItemTemplate>
<ItemStyle CssClass="subheader"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField  ItemStyle-CssClass="subheader">
                   <HeaderTemplate>
                   <%=GetLatestMonthByCurrentMonth(-5)%> <br />ALN
                   </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" Text='<%# ShowFork(bool.Parse(Eval("IsOrderInSixALN").ToString())) %>' runat="server"></asp:Label>
                    </ItemTemplate>
<ItemStyle CssClass="subheader"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField   ItemStyle-CssClass="subheader">
                    <HeaderTemplate>
                    <%=GetLatestMonthByCurrentMonth(-5)%><br /> Bus
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" Text='<%# ShowFork(bool.Parse(Eval("IsOrderInSixBus").ToString())) %>'
                            runat="server"></asp:Label>
                    </ItemTemplate>
                    

<ItemStyle CssClass="subheader"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField   ItemStyle-CssClass="subheader">
 <HeaderTemplate>
 <%=GetLatestMonthByCurrentMonth(-4)%> <br /> ALN
 </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label3" Text='<%# ShowFork(bool.Parse(Eval("IsOrderInFiveALN").ToString())) %>'
                            runat="server"></asp:Label>
                    </ItemTemplate>
                    

<ItemStyle CssClass="subheader"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="" ItemStyle-CssClass="subheader">
                    <HeaderTemplate>
                    <%=GetLatestMonthByCurrentMonth(-4)%> <br/> Bus
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label5" Text='<%# ShowFork(bool.Parse(Eval("IsOrderInFiveBus").ToString())) %>'
                            runat="server"></asp:Label>
                    </ItemTemplate>
                    

<ItemStyle CssClass="subheader"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField  ItemStyle-CssClass="subheader">
                    <HeaderTemplate>
                    <%=GetLatestMonthByCurrentMonth(-3)%><br /> ALN
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label7" Text='<%# ShowFork(bool.Parse(Eval("IsOrderInFourALN").ToString())) %>'
                            runat="server"></asp:Label>
                    </ItemTemplate>
                    

<ItemStyle CssClass="subheader"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField   ItemStyle-CssClass="subheader">
                    <HeaderTemplate>
                    <%=GetLatestMonthByCurrentMonth(-3)%><br /> Bus
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label9" Text='<%# ShowFork(bool.Parse(Eval("IsOrderInFourBus").ToString())) %>'
                            runat="server"></asp:Label>
                    </ItemTemplate>
                    

<ItemStyle CssClass="subheader"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField   ItemStyle-CssClass="subheader">
                   <HeaderTemplate>
                   <%=GetLatestMonthByCurrentMonth(-2)%><br /> ALN
                   </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label11" Text='<%# ShowFork(bool.Parse(Eval("IsOrderInThreeALN").ToString())) %>'
                            runat="server"></asp:Label>
                    </ItemTemplate>
                    

<ItemStyle CssClass="subheader"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField  ItemStyle-CssClass="subheader">
                    <HeaderTemplate>
                    <%=GetLatestMonthByCurrentMonth(-2)%><br /> Bus
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label13" Text='<%# ShowFork(bool.Parse(Eval("IsOrderInThreeBus").ToString())) %>'
                            runat="server"></asp:Label>
                    </ItemTemplate>
                    

<ItemStyle CssClass="subheader"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="" ItemStyle-CssClass="subheader">
                    <HeaderTemplate>
                    <%=GetLatestMonthByCurrentMonth(-1)%><br /> ALN
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label15" Text='<%# ShowFork(bool.Parse(Eval("IsOrderInTwoALN").ToString())) %>'
                            runat="server"></asp:Label>
                    </ItemTemplate>
                    

<ItemStyle CssClass="subheader"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField   ItemStyle-CssClass="subheader">
                    <HeaderTemplate>
                    <%=GetLatestMonthByCurrentMonth(-1)%><br /> Bus
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label17" Text='<%# ShowFork(bool.Parse(Eval("IsOrderInTwoBus").ToString())) %>'
                            runat="server"></asp:Label>
                    </ItemTemplate>
                    

<ItemStyle CssClass="subheader"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField  ItemStyle-CssClass="subheader">
                    <HeaderTemplate>
                    <%=GetLatestMonthByCurrentMonth(0)%> <br /> ALN
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label19" Text='<%# ShowFork(bool.Parse(Eval("IsOrderInOneALN").ToString())) %>'
                            runat="server"></asp:Label>
                    </ItemTemplate>
                    

<ItemStyle CssClass="subheader"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField  ItemStyle-CssClass="subheader">
                    <HeaderTemplate>
                    <%=GetLatestMonthByCurrentMonth(0)%><br /> Bus
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label20" Text='<%# ShowFork(bool.Parse(Eval("IsOrderInOneBus").ToString())) %>'
                            runat="server"></asp:Label>
                    </ItemTemplate>
                    

<ItemStyle CssClass="subheader"></ItemStyle>
                </asp:TemplateField>
            </Columns>

        </asp:GridView>
    
    </div>
    </form>
</body>
</html>
